import './globals.css';
import type { Metadata } from 'next';
import { Inter } from 'next/font/google';
import Script from 'next/script';
import StoreWrapper from '@/components/StoreWrapper';

const inter = Inter({ subsets: ['latin'] });

export const metadata: Metadata = {
  title: 'LynTime - Power Industry Solutions',
  description: 'Comprehensive solutions for the power industry including electricity price forecasting, load forecasting, PV forecasting, wind power forecasting, and bidding space analysis.',
};

// Root layout (server component)
export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body className={inter.className}>
        <StoreWrapper>
          {children}
        </StoreWrapper>
        {/* Add any analytics or other scripts here */}
        <Script id="analytics" strategy="afterInteractive">
          {`
            // Add analytics code here if needed
          `}
        </Script>
      </body>
    </html>
  );
}
